package com.tanhua.server.service;

import com.tanhua.model.db.User;
import com.tanhua.model.vo.HuanXinUserVo;
import com.tanhua.server.interceptor.UserHolder;
import org.springframework.stereotype.Service;

@Service
public class HuanXinService {
    /**
     * 获取登录用户的环信账号
     * @return
     */
    public HuanXinUserVo getHuanXinUser() {
        User loginUser = UserHolder.getUser();
        HuanXinUserVo vo = new HuanXinUserVo();
        vo.setUsername(loginUser.getHxUser());
        //【注意】这里必须使用环信上的密码
        vo.setPassword(loginUser.getHxPassword());
        return vo;
    }
}
